package User;

import Book.Booklist;
import Operation.*;

import java.util.Scanner;

public class Nomaluser extends User {
    Scanner sc=new Scanner(System.in);
    public Nomaluser(String name){
        super(name);
        this.ioperation=new Ioperation[]{
                new exitBook(),
                new selectBook(),
                new borrowBook(),
                new leadBook()
        };
    }
    public int meau(){
        System.out.println("欢迎"+name+"来到普通成员菜单");
        System.out.println("------------------");
        System.out.println("1.查找图书");
        System.out.println("2.借阅图书");
        System.out.println("3.归还图书");
        System.out.println("0.退出系统");
        System.out.println("------------------");
        System.out.println("请输入你的操作");
        int num=sc.nextInt();
        return num;
    }
    public void open(int choice,Booklist booklist){
        ioperation[choice].work(booklist);
    }
}
